export KUBEVIRT_VERSION=$(curl -s https://api.github.com/repos/kubevirt/kubevirt/releases|grep tag_name|sort -V | tail -1 | awk -F':' '{print $2}' | sed 's/,//' | xargs)

kubectl create -f https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml


egrep 'svm|vmx' /proc/cpuinfo，如果返回为空，说明机器不支持虚拟化，执行下面命令开启
kubectl create configmap kubevirt-config -n kubevirt --from-literal debug.useEmulation=true

部署KubeVirt
kubectl create configmap kubevirt-config -n kubevirt --from-literal debug.useEmulation=true

安装命令行
curl -L -o virtctl https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/virtctl-${KUBEVIRT_VERSION}-linux-amd64
chmod +x virtctl

参考文档
https://kubevirt.io/labs/kubernetes/lab1
https://kubevirt.io/labs/kubernetes/lab2